<?php use_stylesheets_for_form($form) ?>
<?php use_javascripts_for_form($form) ?>


<?php echo form_tag_for($form, '@sf_guard_user')?>
<table>
    <tfoot>
      <tr>
        <td colspan="2">
          <?php echo $form->renderHiddenFields(false) ?>

          <input type="submit" value="Save" />
        </td>
      </tr>
    </tfoot>
    <tbody>
            <?php echo $form->renderGlobalErrors() ?>
      <tr>
        <th><?php echo $form['first_name']->renderLabel() ?></th>
        <td>
            <?php echo $form['first_name']->renderError() ?>
            <?php echo $form['first_name'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['last_name']->renderLabel() ?></th>
        <td>
            <?php echo $form['last_name']->renderError() ?>
            <?php echo $form['last_name'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['email_address']->renderLabel() ?></th>
        <td>
            <?php echo $form['email_address']->renderError() ?>
            <?php echo $form['email_address'] ?>
        </td>
      </tr>
            <tr>
        <th><?php echo $form['username']->renderLabel() ?></th>
        <td>
            <?php echo $form['username']->renderError() ?>
            <?php echo $form['username'] ?>
        </td>
      </tr>
                  <tr>
        <th><?php echo $form['password']->renderLabel() ?></th>
        <td>
            <?php echo $form['password']->renderError() ?>
            <?php echo $form['password'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['password_again']->renderLabel() ?></th>
        <td>
            <?php echo $form['password_again']->renderError() ?>
            <?php echo $form['password_again'] ?>
        </td>
      </tr>
      
      <?php if ($sf_user->isSuperAdmin()): ?>
      <tr>
        <th><?php echo $form['is_active']->renderLabel() ?></th>
        <td>
            <?php echo $form['is_active']->renderError() ?>
            <?php echo $form['is_active'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['is_super_admin']->renderLabel() ?></th>
        <td>
            <?php echo $form['is_super_admin']->renderError() ?>
            <?php echo $form['is_super_admin'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['groups_list']->renderLabel() ?></th>
        <td>
            <?php echo $form['groups_list']->renderError() ?>
            <?php echo $form['groups_list'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['permissions_list']->renderLabel() ?></th>
        <td>
            <?php echo $form['permissions_list']->renderError() ?>
            <?php echo $form['permissions_list'] ?>
        </td>
      </tr>
      <?php endif ?>
        
    </tbody>
  </table>
</form>
